-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Fix #13306: Hour overflow in tz-aware datetime conversions. #13313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Current coverage is 84.22%@@ master #13313 diff @@
==========================================
Files 138 138
Lines 50713 50666 -47
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 42715 42672 -43
+ Misses 7998 7994 -4
Partials 0 0
|
how would you know this worked without tests? this needs 2 paths 1 if is_montonic (iow is sorted); 1 if not |
let me know if you need anything else from me |
@@ -898,6 +898,46 @@ def test_utc_with_system_utc(self): | |||
# check that the time hasn't changed. | |||
self.assertEqual(ts, ts.tz_convert(dateutil.tz.tzutc())) | |||
|
|||
def test_tslib_tz_convert_hour_overflow_dst_bug(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also put in tests for Timestamp (which are good, but for consistency). you can put in another test function.
pls add a whatsnew note as well (Bug fix section) |
ok, thanks. i'll do that stuff tonight |
sure, ping when ready |
can you add a whatsnew entry, otherwise lgtm. |
Figured out how to add whatsnew entry :) |
sigh, will have to deal with conflict tonight. cannot do it at work. it's in the v0.18.2.txt file. feel free to resolve it yourself if you don't want to wait until tonight |
i'm done. take over if you're ok with it |
👍 |
thanks @uwedeportivo yeah ideally we would check sortedness in the cython code (e.g. |
git diff upstream/master | flake8 --diff
Bug: tz-converting tz-aware DateTimeIndex relied on index being sorted for correct results.